CREATE TABLE [dbo].[TTTIPO_INF2]
(
[TI_INF1] [dbo].[TD_VC_008] NOT NULL,
[TI_INF2] [dbo].[TD_VC_008] NOT NULL,
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[DE_TIPO_INF2] [dbo].[TD_VC_050] NOT NULL CONSTRAINT [DF__TTTIPO_IN__DE_TI__39AD8A7F] DEFAULT (' '),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_IN__CO_US__3AA1AEB8] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_IN__FE_US__3B95D2F1] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTTIPO_IN__CO_US__3C89F72A] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTTIPO_IN__FE_US__3D7E1B63] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_INF2] ADD CONSTRAINT [PK__TTTIPO_I__99CF5AE30F4D3C5F] PRIMARY KEY CLUSTERED  ([TI_INF1], [TI_INF2], [CO_EMPR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTTIPO_INF2] ADD CONSTRAINT [FK__TTTIPO_INF2__5AA469F6] FOREIGN KEY ([TI_INF1], [CO_EMPR]) REFERENCES [dbo].[TTTIPO_INF1] ([TI_INF1], [CO_EMPR])
GO
GRANT SELECT ON  [dbo].[TTTIPO_INF2] TO [public]
GRANT INSERT ON  [dbo].[TTTIPO_INF2] TO [public]
GRANT DELETE ON  [dbo].[TTTIPO_INF2] TO [public]
GRANT UPDATE ON  [dbo].[TTTIPO_INF2] TO [public]
GO
